/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.namabank.helpdesk.model;

import com.namabank.db.GlobalHibernate;
import com.namabank.helpdesk.dbobj.*;
import org.apache.commons.lang.StringEscapeUtils;

/**
 *
 * @author Nguyen Tran Hien
 */
public class DepartmentModel {
    public static String ALL_DEPT_VAL = "ALL";
    
    public DepartmentModel(){}

    public static SMTB_DEPARTMENT getSMTB_DEPARTMENTById(String deptId){
        String qry = "from SMTB_DEPARTMENT where DEPT_ID = '" + StringEscapeUtils.escapeSql(deptId) + "'";
        return (SMTB_DEPARTMENT)GlobalHibernate.openSession().createQuery(qry).uniqueResult();
    }
}
